package com.apes.fn.pur.commodityInquiry.service;

import com.alibaba.fastjson.JSONObject;
import com.apes.framework.api.DomainService;
import com.apes.framework.util.MapUtil;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
public class CommodityInquiryOrderManager extends DomainService {
    public JSONObject synErp(String method, Object object) {
        Map map = mapper("body", object, "headers", MapUtil.mapper("method", method));
        Object result = invoke("pi.yyerp.invoke", map);
        System.out.println(result.toString());
        JSONObject resultObject = JSONObject.parseObject(result.toString());
        System.out.println(resultObject);
        return resultObject;
    }
}
